{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Looking Ahead**\n",
    "\n",
    "## Cryptography and Quantum Computing Looking Ahead\n",
    "\n",
    "**Waldemir Cambiucci**\n",
    "\n",
    "The word \"cryptography\" is associated with the need to treat information in a confidential way, providing\n",
    "protection for a communication channel between two parties. This is a broad definition for cryptography,\n",
    "a critical discipline for business today and area with great exposure to the eminent quantum revolution.\n",
    "\n",
    "We can define an encryption algorithm as a reversible function that transforms an open message\n",
    "(available to any reader) into an encrypted or protected message (available only to the recipient), using a\n",
    "process based on an encryption algorithm and a key encryption. As an example, we can think of two\n",
    "participants, Alice and Bob, planning a communication. Alice uses an encryption algorithm to send a\n",
    "message to Bob. This encryption algorithm is based on an encryption function, which uses as a parameter\n",
    "an encryption key previously agreed between them. Only with the correct key can Bob open the message\n",
    "encrypted by Alice, thus decrypting the encrypted message by accessing Alice's original message. A third\n",
    "party, here called Eve, may try to read the message during the communication between Alice and Bob.\n",
    "Only if Eve has the correct encryption key will Alice open the encrypted message and access her\n",
    "information. Not being expected that Eve reads the message, the coding of the message protects the\n",
    "information of unwanted readers, thus making the message confidential.\n",
    "\n",
    "![Figure cryptokey](image/cryptokey.png)\n",
    "\n",
    "Confidentiality is a great area of application of in cryptography, being applied for several fields of\n",
    "communication. In fact, we can identify four major needs in the field of secure communication and data\n",
    "protection these days:\n",
    "\n",
    "1. **Integrity of information:** It is important to ensure the consistency of the information contained\n",
    "in the message during a communication, and it is possible to identify if the message was sent\n",
    "consistently, without changes between the parties;\n",
    "\n",
    "\n",
    "2. **Confidentiality of information** : It is important to ensure that only the right communication\n",
    "participants have access to the message in transit, thus preventing external users from accessing the\n",
    "information contained in the message;\n",
    "3. **Authentication of participants:** It is important to guarantee the identity of a participant in the\n",
    "communication, preventing unauthorized external entities from accessing the information contained\n",
    "in the messages;\n",
    "4. **Non-repudiation of information:** Finally, it is important to ensure that participants in a\n",
    "communication cannot deny their transactions, whether it is for transmission or for receiving\n",
    "messages.\n",
    "\n",
    "In order to support each of these needs, we have seen over the years numerous encryption\n",
    "protocols being developed and adopted by the industry, based on different cryptographic techniques and\n",
    "mathematical functions to embed greater resistances against attacks or malicious actions during\n",
    "communication. In general, encryption breaks or security attacks involve malicious actions that try to\n",
    "circumvent, or break encryption standards used to misuse critical messages or information about people\n",
    "or companies, being a major challenge and risk to business today.\n",
    "\n",
    "### Standard Algorithms for Cryptography\n",
    "\n",
    "A major challenge in the application of cryptography in business environments is to ensure\n",
    "communication between systems in an interoperable way, allowing integration between different parties\n",
    "and platforms. Thus, the [National Institute of Standards and Technology](https://www.nist.gov/) has been\n",
    "the main coordinator for the standardization of techniques.\n",
    "The **National Institute of Standards and Technology** is a physical sciences laboratory, and a non-\n",
    "regulatory agency of the United States Department of Commerce. Its mission is to promote innovation\n",
    "and industrial competitiveness. NIST's activities are organized into laboratory programs that include\n",
    "nanoscale science and technology, engineering, information technology, neutron research, material\n",
    "measurement, cybersecurity, standards, and physical measurement.\n",
    "\n",
    "In the link below, NIST is consolidating all the work around cryptographic technology, as circuit\n",
    "complexity, elliptic curve cryptography, lightweight cryptography, pairing-based cryptography, and post-\n",
    "quantum cryptography.\n",
    "\n",
    "https://csrc.nist.gov/Groups/Computer-Security-Division/Cryptographic-Technology\n",
    "\n",
    "In fact, we have much more standards and projects running at NIST and it is critical for us to be\n",
    "aware of them, tracking developments, launches, and new standards for our systems. In the picture below\n",
    "we have a great landscape of standards around cryptography and how they apply for each scenario and\n",
    "application:\n",
    "\n",
    "![Figure NIST](image/NIST.png)\n",
    "\n",
    "[_The impact on crypto with Quantum Computing – list of standards. Source: The NIST Post-Quantum\n",
    "Crypto \"Competition\", Dustin Moody, NIST, 2017._](https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/asiacrypt-2017-moody-pqc.pdf)\n",
    "\n",
    "From this picture, we can see three different areas with international standards for security, that\n",
    "companies around the world are using to protect communications among participants. In fact, all the\n",
    "discussions around cryptography is about to control the information, and the ability to control who is\n",
    "assigned to read the data, or to send the data in a transaction.\n",
    "\n",
    "In this intent, standards for cryptography are very important because without them, it would be\n",
    "impossible to integrate different systems, separated by regions or regulations, communicating by internet,\n",
    "for example.\n",
    "\n",
    "So we have a list of standard based in **Public Key** , as used for signatures (FIPS 186) or Key\n",
    "establishment (800-56 A/B/C); in the same way, use have standards based on **Symmetric Keys** , as AES\n",
    "(FIPS 197), TDEA (800-67), MODES OF OPERATIOS (800 38A 38G), SHA-1/2 (FIPS 180), SHA-3 (FIPS 202),\n",
    "RANDOMIZE HASH (800-106), HMAC (FIPS 198); finally, we have **Guidelines from NIST** as TRANSITION\n",
    "(800-131A), KEY GENERATIONS, and KEY MANAGEMENT.\n",
    "\n",
    "In fact, for each group of standards we have different approaches used to create how to discover\n",
    "a key or a secret used to encrypt the message. According to the algorithm used for this encryption, we\n",
    "have a specific amount of effort needed to break security and decrypt the message, getting the\n",
    "information we are targeting.\n",
    "\n",
    "\n",
    "## The impact of Quantum Computing on Cryptography\n",
    "\n",
    "In this tutorial on quantum computing, we saw discussions about the impact of quantum computers and\n",
    "how they can change the _status quo_ for many industries, while solving problems today we can't do using\n",
    "classical computers. We saw discussions around _quantum speedup_ , and the exponential advantage\n",
    "quantum computers can show up while running specific algorithms for different problems.\n",
    "\n",
    "Two specific algorithms in quantum computing have an impact for security: **Grover** and **Shor**.\n",
    "\n",
    "1. As we saw in Phase 2, **Grover's algorithm** is used to search for an item in an unordered list more\n",
    "efficiently than a classical computer. It finds with high probability the unique input to a black box\n",
    "function that produces an output value. Another possibility is to apply Grover to break specific\n",
    "standards of algorithm based on Symmetric Key, like AES, for example. The advantage of Grover's\n",
    "algorithm can change an effort from 2N to 2N/2. So, for a specific key of 128 bits, used in AES, applying\n",
    "Grover's algorithm can create a scenario equivalent to 64 bits, which is not strong enough for today's\n",
    "standards.\n",
    "\n",
    "![Figure Grover](image/Grover.png)\n",
    "\n",
    "[_Grover's algorithm. Source: Wikipedia._](https://en.wikipedia.org/wiki/Grover%27s_algorithm)\n",
    "\n",
    "2. With **Shor's algorithm** we saw a great application to find period for odd numbers. Given an integer\n",
    "N, it is possible to find its prime factors using this quantum algorithm. In this case, as demonstrated\n",
    "by Peter Shor, it would be possible to find a period for great numbers, discovering the secret key for\n",
    "a scenario of public key security. It creates direct impact for RSA and DH standards for security today.\n",
    "\n",
    "![Figure Shor](image/Shor.png)\n",
    "\n",
    "[_Shor's algorithm. Source: Wikipedia._](https://en.wikipedia.org/wiki/Shor%27s_algorithm)\n",
    "\n",
    "Since the 90s, we have a great action in the academia and standard to study the impact of\n",
    "Quantum Computing for cryptography. Mainly because of Shor's algorithm, much of the hype around\n",
    "\n",
    "\n",
    "Quantum Computing was created, calling the attention from companies, institutes, academia, and\n",
    "governs about the future impact with a quantum computer.\n",
    "\n",
    "In fact, we can say that for a set of standards based in Public Key as RSA, for example, a quantum\n",
    "computer can break the key and access the message. For example, a 1024-bit key could be broken with a\n",
    "quantum computer of 5124 qubits in 4.5 minutes. That's right, as soon as we have a quantum computer\n",
    "of 5K qubits, 1024-bit keys can be factored in minutes. The same goes for 2048-bit keys. 4096-bit keys\n",
    "would be broken in hours, using quantum 20K qubit computers.\n",
    "\n",
    "![Figure NIST crypt](image/NIST_crypto.png)\n",
    "\n",
    "[_The impact on Crypto – standards with critical impact. Source: The NIST Post-Quantum Crypto\n",
    "\"Competition\", Dustin Moody, NIST, 2017._](https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/asiacrypt-2017-moody-pqc.pdf)\n",
    "\n",
    "From NIST, we already have the list of standards suffering impact from quantum attacks:\n",
    "\n",
    "Impact for Public key crypto: FIPS 186-4, SP 800-56A/56B\n",
    "\n",
    "3. RSA\n",
    "4. Elliptic Curve Cryptography (ECDSA)\n",
    "5. Finite Field Cryptography (DSA)\n",
    "6. Diffie-Hellman key exchange\n",
    "Impact for Symmetric key crypto: FIPS 197, SP 800- 57\n",
    "1. AES\n",
    "2. Triple DES\n",
    "\n",
    "Impact for Hash functions: FIPS 180-4, FIPS 202\n",
    "\n",
    "1. SHA-1, SHA-2 and SHA-3\n",
    "\n",
    "For each one of these groups or standards we already have recommendations from NIST, as\n",
    "follow:\n",
    "\n",
    "\n",
    "Impact for Public key crypto: FIPS 186-4, SP 800-56A/56B\n",
    "\n",
    "7. RSA (WE MUST REPLACE THIS STANDARD)\n",
    "8. Elliptic Curve Cryptography (ECDSA) (WE MUST REPLACE THIS STANDARD)\n",
    "9. Finite Field Cryptography (DSA) (WE MUST REPLACE THIS STANDARD)\n",
    "10. Diffie-Hellman key exchange (WE MUST REPLACE THIS STANDARD)\n",
    "\n",
    "Impact for Symmetric key crypto: FIPS 197, SP 800- 57\n",
    "\n",
    "3. AES (WE NEED LARGER KEYS AS A SOLUTION)\n",
    "4. Triple DES (WE NEED LARGER KEYS AS A SOLUTION)\n",
    "\n",
    "Impact for Hash functions: FIPS 180-4, FIPS 202\n",
    "\n",
    "2. SHA-1, SHA-2 and SHA-3 (WE NEED TO USE LONGER OUTPUT)\n",
    "\n",
    "From these recommendations, we can see that we don't need to panic for complete, but we need\n",
    "to take a closer look in every system, to understand the impact and exposition against the different\n",
    "standards we are using today.\n",
    "\n",
    "You can check the complete discussion from NIST around the standard here in these links:\n",
    "\n",
    "https://csrc.nist.gov/CSRC/media//Projects/Post-Quantum-Cryptography/documents/pqcrypto-2016-presentation.pdf\n",
    "\n",
    "https://csrc.nist.gov/CSRC/media//Projects/Post-Quantum-Cryptography/documents/asiacrypt-2017-moody-pqc.pdf\n",
    "\n",
    "## How Shor's algorithm can affect cryptography?\n",
    "\n",
    "Modern cryptography is a foundation for critical needs today, mainly for the protection of information\n",
    "and economic security, creating conditions for secure communication between organizations, individuals,\n",
    "businesses, and governments. We can divide cryptosystems in two classes: symmetric-key and\n",
    "asymmetric-key.\n",
    "\n",
    "**Symmetric-key cryptography** – or just symmetric key algorithms are algorithms for cryptography\n",
    "that use the same cryptographic key for both encryption and decryption of a message. The keys may be\n",
    "identical or there may be a simple transformation to go between the two keys. In fact, the keys represent\n",
    "a shared secret between two or more parties that can be used to maintain a private information channel\n",
    "for communication and data exchange.\n",
    "\n",
    "**Asymmetric-key cryptography** – or just public-key cryptography – can use a public key and a\n",
    "private key to encode and decode a message. The two distinct keys are mathematically related via a one-\n",
    "way function, which is computationally efficient to calculate in one direction, but not in the inverse\n",
    "direction. This means that is easy to calculate the key based in two co-prime numbers, but it is difficult to\n",
    "factor the product between the two co-prime numbers, to find the original key.\n",
    "\n",
    "\n",
    "The workhorse of public-key encryption schemes is the RSA cryptosystem, which can be work into\n",
    "four steps:\n",
    "\n",
    "1. key generation, a public key and a private key for use;\n",
    "2. public key distribution;\n",
    "3. message encryption (a message \"m\" and a ciphertext \"c\") and transmission;\n",
    "4. message decryption;\n",
    "\n",
    "To understand the entire process and how Shor's algorithm can impact RSA cryptosystems, let's\n",
    "simulate the encryption and decryption for a message, as follow:\n",
    "\n",
    "**Step 1. Key generation – create the key** $N$ **as the product of two prime numbers** $p$ **and** $q$ **:**\n",
    "\n",
    "Let's work with two prime numbers for exercise, for example, $p=101$ and $q=113$. The values of $p$\n",
    "and $q$ result a modulus $N$ and also a number call $r$, where $r=(p-1)(q-1)$. This $r$ is called the period\n",
    "between $p$ and $q$ and we can use it to find the original $N$, as we will see soon. In fact, we need to find two\n",
    "numbers $e$ and $d$ whose product is a number equal to $1$ _mod_ $r$. For our exercise, $N=p*q=101*113=11413$, and $r=(p-1)(q-1)=11200$.\n",
    "\n",
    "**Step 2. Find a number equal to** $1$ _mod_ $r$ **which can be factored.**\n",
    "\n",
    "For our exercise, we can work in our exercise with $k=13$.\n",
    "\n",
    "**Step 3. Find two numbers** $e$ **and** $D$ **that are relatively prime to** $N$ **and for which** $e*d=1$ _mod_ $r$\n",
    "\n",
    "In our exercise, we can use the factorization info to factor $K$ into two numbers, $e$ and $d$.\n",
    "\n",
    "Therefore, we have:\n",
    "$e=13$\n",
    "$d=9477$\n",
    "$N=11413$\n",
    "$r=11200$\n",
    "$e*d=123201$\n",
    "$e*d$ _mod_ $r=1$,\n",
    "where, $e$ and $r$ are relatively prime; $d$ and $r$ are relatively prime.\n",
    "\n",
    "**Step 4. Finally, we can use** $e$ **and** $d **to encode and decode a message.**\n",
    "\n",
    "In this case, our Message can be a number, like 123.\n",
    "\n",
    "For $MSG=123$\n",
    "\n",
    "$Encrypted message = cipher = (msg)^e$ _mod_ $N = (123)^{13}$ _mod_ $11413 = 5790$\n",
    "\n",
    "We can see this using the WolframAlpha, here:\n",
    "\n",
    "https://www.wolframalpha.com/input/?i=(123)%5E13+mod+11413\n",
    "\n",
    "$Decrypted message = msg = (cipher)^d$ _mod_ $N = 5790^{9477}$ _mod_ $11413 = 123$\n",
    "\n",
    "We can see this using the WolframAlpha, here:\n",
    "\n",
    "https://www.wolframalpha.com/input/?i=5790%5E9477+mod+11413\n",
    "\n",
    "For our exercise we used very small prime numbers, but for commercial systems, we apply big\n",
    "prime numbers, which increase the difficult to factoring those numbers in scenarios of attack.\n",
    "\n",
    "## How do the quantum circuits for Shor's algorithm work?\n",
    "\n",
    "As we know, **Shor's Algorithm** and period finding can be used to calculate prime numbers $p$ and $q$, and\n",
    "thus calculating the private decryption key and compromise the RSA cryptosystem. As we have seen above,\n",
    "this is possible because $N$, our private key for RSA, is the product of $p$ and $q$. Assuming $p$ and $q$ are co-\n",
    "prime, we can image them as sine waves. There is a point where the harmony of $p$ overlaps with and\n",
    "repeats itself. This we can call \"period\". The Shor's algorithm is based in this question: what's the period\n",
    "between $p$ and $q$, called $r$. As we saw, we can calculate $r$ as the product of $(p-1)(q-1)$. If we test\n",
    "the point $N$ then the phase of $p$ and $q$ should be 0 if they are factors of $N$. If not, there would be a\n",
    "remainder of the division of $N/q$ or $N/p$. With Shor's algorithm, we test whether the phase of $p$ is equal\n",
    "to the phase of $q$ and they are zero at point $N$. Doing this, Shor's algorithm can find $r$, creating the\n",
    "conditions to break the RSA crypto.\n",
    "\n",
    "Shor's algorithm is a quantum algorithm for finding the prime factors of an integer $N$, product of\n",
    "$p$ and $q$. 퐶퐶 is a very large integer, so the process of factoring is not be applied via brute force during an\n",
    "attack. So instead of guessing the factors around $N$, what is the most efficient way is finding $r$, considering\n",
    "the hint that $N$ is one prime factorizable and $R$ is periodic, i.e. $f(x)=f(x+r)$. So, you should find $r$ for\n",
    "a $f(x)$ that has a repeating pattern. And for this process, we can use fourier tranforms on periodic\n",
    "functions.\n",
    "\n",
    "Here is where Shor's algorithm can play. It uses a method called the Quantum Discrete Fourier\n",
    "transform (QFT) to find the period $r$, so we can call as period finding algorithm. A Discrete Fourier\n",
    "Transform transforms a set of numbers into a set of sines and cosines. A QFT instead generates a list of\n",
    "the \"probability amplitudes\" for the given list of qubit states.\n",
    "\n",
    "While we have issues with this approach using classical computers, a quantum computer can\n",
    "perform this task because:\n",
    "\n",
    "\n",
    "1. A quantum computer can 'exist' in many states simultaneously, which enables it to evaluate the periodic\n",
    "function $f(x)$ at all points simultaneously;\n",
    "\n",
    "2. A QFT is computed by a quantum circuit which uses two parts: a Hadamard transform, mapping $n$ qubits\n",
    "to a superposition of $2^n$ orthogonal states; and a quantum gates.\n",
    "\n",
    "At the end, for a particular 'possible' value of the period $r$, the quantum computer can exist in\n",
    "different states and in some way contribute to the value of $r$. Finally, these states cancel out each other.\n",
    "However, only for the correct value of $r$ do the states add up along the same direction. Shor's algorithm\n",
    "is probabilistic by nature and its performance improves with a number of repetitions.\n",
    "\n",
    "## How Grover's algorithm can affect cryptography?\n",
    "\n",
    "Grover's algorithm can search an unordered list of length $N$ in time square $N$. Applied to cryptography\n",
    "this means that it can recover $n$ bit keys and find preimages for $n$ bit hashes with cost $2^{n/2}$. So, for a\n",
    "system using a key with 128 bits, the Grover's algorithm can create a condition of 64 bits for the key,\n",
    "decreasing the effort for an attack.\n",
    "\n",
    "## How do the quantum circuits for Grover's algorithm work?\n",
    "\n",
    "Like other quantum algorithms, Grover's begins by putting the machine into an equal superposition of all\n",
    "\n",
    "possible $2^n$ states of the $n$-qubit register. So it means there is an equal amplitude of $(\\frac{1}{\\sqrt{2}})^n$\n",
    "associated with every possible configuration of qubits in the system, and an equal probability of $(\\frac{1}{2})^n$\n",
    "that the system will be in any of the $2^n$ states.\n",
    "\n",
    "All of the possible states correspond to all the possible entries in Grover's database, and so\n",
    "starting with equal amplitudes assigned to each element in the search space, every element can be\n",
    "considered at once in a quantum superposition, and amplitudes can be manipulated from there to\n",
    "\n",
    "produce the correct entry in the database with a probability of \"at least\" $\\frac{1}{2}$. For further information about\n",
    "\n",
    "Quantum algorithms, we can check the forum here: https://quantumcomputing.stackexchange.com/\n",
    "\n",
    "## Encryption in the post-Quantum era\n",
    "\n",
    "As you may already know, private communication between people and companies is often protected\n",
    "online through encryption. Encryption protects our information in transit or persisted in the network. But\n",
    "from success with quantum computing, a new cryptography must be adopted. In this context, Quantum\n",
    "Cryptography aims to create security methods and protocols based on quantum physics and physics phenomena, which makes communication breakdown virtually impossible. And the most interesting thing\n",
    "about this process is that we can prove mathematically the impossibility of breaking quantum keys.\n",
    "For example, _QKD - Quantum Key Distribution_ is a secure communication method that involves\n",
    "cryptographic key distribution protocols, ensuring peer communication through quantum systems.\n",
    "Protocols such as BB84 and E91 are examples of QKD. In the table below, we have a representation of the\n",
    "information exchanged through the QKD protocol, in different communication scenarios.\n",
    "\n",
    "![Figure BB84](image/BB84.png)\n",
    "\n",
    "[_BB84 – A Quantum Key Distribution protocol. Source: International Conference on Computer, Bangalore,\n",
    "India, 1984. Quantum Cryptography: Public Key Distribution and Coin Tossing., Charles Bennett & Gilles\n",
    "Brassard._](https://researcher.watson.ibm.com/researcher/files/us-bennetc/BB84highest.pdf)\n",
    "\n",
    "QKD still faces technical challenges for its adoption by the market. It is still necessary to evolve\n",
    "the technology to support larger communication distances between the pairs, new transmission and\n",
    "reception components must be developed for the cheapness in the communication systems (photons are\n",
    "currently used as data persistence elements in the transmission), achieve a higher sending speed during\n",
    "communication, as well as new tests for different types of attacks; but it is already a method widely\n",
    "explored by academia.\n",
    "\n",
    "## Mosca's Inequality equation\n",
    "\n",
    "It is easy to realize the impact for data and systems not prepared for attacks using quantum computers.\n",
    "In fact, we already have an equation putting in numbers this timeline for the first's incidents in the\n",
    "cyberspace.\n",
    "\n",
    "Michele Mosca is a co-founder and deputy director of the Institute for Quantum Computing at\n",
    "the University of Waterloo, researcher and founding member of the Perimeter Institute for Theoretical\n",
    "Physics, and professor of mathematics in the department of Combinatorics & Optimization at the\n",
    "University of Waterloo. He has held a Tier 2 Canada Research Chair in Quantum Computation since\n",
    "January 2002 and has been a scholar for the Canadian Institute for Advanced Research since September\n",
    "\n",
    "2003. Mosca's principal research interests concern the design of quantum algorithms, but he is also known\n",
    "for his early work on NMR quantum computation together with Jonathan A. Jones. We had the equation\n",
    "called _Mosca's Inequality equation_ about the impact for crypto versus the availability of quantum\n",
    "computers in the market, to be used in cyber-attacks.\n",
    "\n",
    "$D+T>Qc$.\n",
    "\n",
    "This equation states that we need to start worrying about the impact of quantum computers\n",
    "when \"D\" (the amount of time that we wish our data to be secure for), when added to \"T\" (the time it will\n",
    "take for our security systems to transition from classical to post-quantum), is greater than \"Qc\" (the time\n",
    "it will take for quantum processors to have reached a scale where they can breach existing encryption\n",
    "protocols).\n",
    "\n",
    "![Figure Mosca](image/Mosca.png)\n",
    "\n",
    "[_Theorem Mosca. Source: Managing the quantum risk to cybersecurity. Global Risk Institute, 2016._]\n",
    "(https://globalriskinstitute.org/wp-content/uploads/2017/07/Quantum-Security-Michele-Mosca-2016.pdf)\n",
    "\n",
    "In one of his talks on quantum cryptography, Mosca points out that, \"we are less likely to have\n",
    "access to timely updates on research and development in the engineering side of quantum computers\n",
    "from those who are building these machines. As more and more of the resource that has come into the\n",
    "sector is sourced from commercial organizations or ventures backed by large volumes of risk capital,\n",
    "competitive pressures now dictate against the publication of results in the public domain. \"\n",
    "\n",
    "Thinking about a specific reference architecture to be applied for a PaaS system in Azure, we can\n",
    "verify many security standards and components today to be compliance with a NIST Special Publication\n",
    "800 -171, for example. You can check this complete picture in the link below:\n",
    "\n",
    "![Figure Azure](image/Azure_security.png)\n",
    "\n",
    "[_Azure Security and Compliance Blueprint - PaaS Web Application for NIST Special Publication 800-171_](https://docs.microsoft.com/en-us/azure/security/blueprints/nist171-paaswa-overview)\n",
    "\n",
    "The impact here is to create a roadmap to move parts of this architecture for a new stage,\n",
    "protected against quantum attacks. In fact, our challenge today is already to think how our systems can\n",
    "be protected using _post-quantum cryptography_ methods or standards before a real quantum computer is\n",
    "ready and available in the market.\n",
    "\n",
    "## Microsoft and Quantum Cryptography\n",
    "\n",
    "Microsoft has been conducting research on quantum computing since 2005 through Microsoft Research.\n",
    "The company's main approach is the construction of a complete development stack, including the\n",
    "implementation of hardware for the persistence of a fermion-based quantum topological computer (or\n",
    "Majorana quasiparticles for the implementation of the expected quantum phenomena of a qubit), as well\n",
    "as tools for error correction, simulation and scalability. Thus, Microsoft maintains a team of researchers\n",
    "around _quantum cryptography_ , or _post-quantum cryptography_.\n",
    "\n",
    "Among the foci of study, a new cryptography must consider numerous factors, such as:\n",
    "\n",
    "- the size of the encryption and signing keys;\n",
    "- the time required to encrypt or decrypt a message, or to sign and verify a signature;\n",
    "- the amount of data sent over the network required to encrypt and decrypt a message;\n",
    "\n",
    "In the context of Quantum Computing, several new analytics and validity testing tools are needed\n",
    "for both cryptanalysis and exploitation of weaknesses and potential new security holes. An interesting\n",
    "aspect in this context is the sense of urgency. In fact, labs around the world do not know when we will\n",
    "have classical cryptography broken by the announcement of a complete first quantum computer, which\n",
    "can happen at any time.\n",
    "\n",
    "That's why Microsoft is working on four candidate cryptography systems at the same time, to\n",
    "work with both quantum capabilities and to support existing protocols.\n",
    "\n",
    "\n",
    "**FrodoKEM** : is based on the Problem Learning problem\n",
    "· https://www.microsoft.com/en-us/research/project/frodokem/\n",
    "**SIKE - Supersingular Isogeny Key Encapsulation** : uses arithmetic operations in elliptic curves, for the\n",
    "construction of keys\n",
    "· https://www.microsoft.com/en-us/research/project/sike/\n",
    "**Picnic** : is a digital signature algorithm for public key, based on symmetric key systems\n",
    "· https://www.microsoft.com/en-us/research/project/picnic/\n",
    "**qTESLA** : is a post-quantum signature scheme based on Ring Learning with Errors (R-LWE)\n",
    "· https://www.microsoft.com/en-us/research/project/qtesla/\n",
    "\n",
    "Each of these studies is fast paced, generating libraries and new directions for the development\n",
    "of new software stacks. What has been interesting in this process is the maturation and application of\n",
    "new approaches, including for methods in classical computer architecture, which has been understood as\n",
    "a byproduct of quantum research for our day-to-day life. These four projects are just part of a complete\n",
    "initiative NIST is running since 2016, for the [_Post Quantum Cryptography Standardization._](https://csrc.nist.gov/Presentations/2016/Announcement-and-outline-of-NIST-s-Call-for-Submis)\n",
    "\n",
    "During this process, 82 submissions, 69 projects accepted, 2 rounds and 26 projects already in this\n",
    "current second round. The list of standards is expected for 2020. In the next table you have a complete\n",
    "list of projects in this process.\n",
    "\n",
    "![Figure Standardization](image/standarization.png)\n",
    "\n",
    "[_Post Quantum Cryptography Standardization: projects in the second round by July 2019._](https://csrc.nist.gov/projects/post-quantum-cryptography/round-2-submissions)\n",
    "\n",
    "\n",
    "In the end, NIST does not expect to \"pick a winner\", ideally, per se, instead several algorithms will\n",
    "emerge as 'good choices'. In fact, they decided it is the time to investigate standardization, as part of the\n",
    "quantum journey, and while NIST is managing this process for the post quantum crypto standardization,\n",
    "a community consensus in a transparent and timely manner is a target, by 2020.\n",
    "\n",
    "\n",
    "## Post-Quantum Cryptography VPN\n",
    "\n",
    "Finally, the impact of post-quantum cryptography is also expanding for communication and the\n",
    "networking environment. Microsoft is also developing the so-called _Post-Quantum Cryptography\n",
    "VPN_. The VPNs establish a secure network between remote computers and organizations, applying\n",
    "encryption tools that should also evolve in an environment with surrounding quantum computers.\n",
    "https://www.microsoft.com/en-us/research/project/post-quantum-crypto-vpn/\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python38332bit225b1603132a4a1f9abff16033481403",
   "display_name": "Python 3.8.3 32-bit"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}